package xp.ass.imitate.express.impl;

import lombok.Data;
import xp.ass.imitate.express.XEvaluateContext;

import java.util.ArrayDeque;
import java.util.Deque;

/**
 * @author chent3
 * @date 2024/9/13
 */
@Data
public class XExpressState {

    private XEvaluateContext context;

    private Deque<Object> contextObjects;


    public XExpressState(XEvaluateContext context) {
        this.context = context;
    }


    public void push(Object obj) {
        if (contextObjects == null) {
            contextObjects = new ArrayDeque<>();
        }
        this.contextObjects.push(obj);
    }

}
